package locations.actions;

import java.util.Collection;
import java.util.LinkedList;

import locations.dao.implement.ProfesionalDAOHibernateJPA;
import locations.model.Profesional;

import com.opensymphony.xwork2.ActionSupport;

public class ProfesionalIndexAction extends ActionSupport {

	private static final long serialVersionUID = 1L;
	Collection<Profesional> profesionales = new LinkedList<Profesional>();
	public String execute(){
		ProfesionalDAOHibernateJPA dao = new ProfesionalDAOHibernateJPA();
		this.setProfesionales(dao.retrieveAll());
		return SUCCESS;
	}
	public Collection<Profesional> getProfesionales() {
		return profesionales;
	}
	public void setProfesionales(Collection<Profesional> profesionales) {
		this.profesionales = profesionales;
	} 
}
